package com.itheima.date;

import java.util.Date;

public class Demo02 {

    public static void main(String[] args) {
        Date date = new Date();

        long time = date.getTime();
        System.out.println(time);
        long l = System.currentTimeMillis();
        System.out.println(l);

        System.out.println(date.getYear());
        System.out.println(date.getMonth());
        System.out.println(date.getDay());
        System.out.println(date.getDate());
        System.out.println(date.getHours());
        System.out.println(date.getMinutes());
        System.out.println(date.getSeconds());

        date.setYear(188);
        date.setDate(31);
        System.out.println(date);//2021年9月2日

    }

}
